3.83 \(\int \frac{(a+b x^3) \sin (c+d x)}{x} \, dx\)

Optimal. Leaf size=57 \[ a \sin (c) \text{CosIntegral}(d x)+a \cos (c) \text{Si}(d x)+\frac{2 b x \sin (c+d x)}{d^2}+\frac{2 b \cos (c+d x)}{d^3}-\frac{b x^2 \cos (c+d x)}{d} \]

[Out]

(2*b*Cos[c + d*x])/d^3 - (b*x^2*Cos[c + d*x])/d + a*CosIntegral[d*x]*Sin[c] + (2*b*x*Sin[c + d*x])/d^2 + a*Cos
[c]*SinIntegral[d*x]

________________________________________________________________________________________

Rubi [A]  time = 0.114928, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.353, Rules used = {3339, 3303, 3299, 3302, 3296, 2638} \[ a \sin (c) \text{CosIntegral}(d x)+a \cos (c) \text{Si}(d x)+\frac{2 b x \sin (c+d x)}{d^2}+\frac{2 b \cos (c+d x)}{d^3}-\frac{b x^2 \cos (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x^3)*Sin[c + d*x])/x,x]

[Out]

(2*b*Cos[c + d*x])/d^3 - (b*x^2*Cos[c + d*x])/d + a*CosIntegral[d*x]*Sin[c] + (2*b*x*Sin[c + d*x])/d^2 + a*Cos
[c]*SinIntegral[d*x]

Rule 3339

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Int[ExpandIntegran
d[Sin[c + d*x], (e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[(c*f)/d + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3299

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\left (a+b x^3\right ) \sin (c+d x)}{x} \, dx &=\int \left (\frac{a \sin (c+d x)}{x}+b x^2 \sin (c+d x)\right ) \, dx\\ &=a \int \frac{\sin (c+d x)}{x} \, dx+b \int x^2 \sin (c+d x) \, dx\\ &=-\frac{b x^2 \cos (c+d x)}{d}+\frac{(2 b) \int x \cos (c+d x) \, dx}{d}+(a \cos (c)) \int \frac{\sin (d x)}{x} \, dx+(a \sin (c)) \int \frac{\cos (d x)}{x} \, dx\\ &=-\frac{b x^2 \cos (c+d x)}{d}+a \text{Ci}(d x) \sin (c)+\frac{2 b x \sin (c+d x)}{d^2}+a \cos (c) \text{Si}(d x)-\frac{(2 b) \int \sin (c+d x) \, dx}{d^2}\\ &=\frac{2 b \cos (c+d x)}{d^3}-\frac{b x^2 \cos (c+d x)}{d}+a \text{Ci}(d x) \sin (c)+\frac{2 b x \sin (c+d x)}{d^2}+a \cos (c) \text{Si}(d x)\\ \end{align*}

Mathematica [A]  time = 0.197216, size = 50, normalized size = 0.88 \[ a \sin (c) \text{CosIntegral}(d x)+a \cos (c) \text{Si}(d x)+\frac{b \left (\left (2-d^2 x^2\right ) \cos (c+d x)+2 d x \sin (c+d x)\right )}{d^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x^3)*Sin[c + d*x])/x,x]

[Out]

a*CosIntegral[d*x]*Sin[c] + (b*((2 - d^2*x^2)*Cos[c + d*x] + 2*d*x*Sin[c + d*x]))/d^3 + a*Cos[c]*SinIntegral[d
*x]

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 112, normalized size = 2. \begin{align*}{\frac{ \left ({c}^{2}+c+1 \right ) b \left ( - \left ( dx+c \right ) ^{2}\cos \left ( dx+c \right ) +2\,\cos \left ( dx+c \right ) +2\, \left ( dx+c \right ) \sin \left ( dx+c \right ) \right ) }{{d}^{3}}}-3\,{\frac{cb \left ( 1+c \right ) \left ( \sin \left ( dx+c \right ) - \left ( dx+c \right ) \cos \left ( dx+c \right ) \right ) }{{d}^{3}}}-3\,{\frac{{c}^{2}b\cos \left ( dx+c \right ) }{{d}^{3}}}+a \left ({\it Si} \left ( dx \right ) \cos \left ( c \right ) +{\it Ci} \left ( dx \right ) \sin \left ( c \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^3+a)*sin(d*x+c)/x,x)

[Out]

(c^2+c+1)/d^3*b*(-(d*x+c)^2*cos(d*x+c)+2*cos(d*x+c)+2*(d*x+c)*sin(d*x+c))-3*c*b*(1+c)/d^3*(sin(d*x+c)-(d*x+c)*
cos(d*x+c))-3*c^2/d^3*b*cos(d*x+c)+a*(Si(d*x)*cos(c)+Ci(d*x)*sin(c))

________________________________________________________________________________________

Maxima [C]  time = 2.74673, size = 103, normalized size = 1.81 \begin{align*} \frac{{\left (a{\left (-i \,{\rm Ei}\left (i \, d x\right ) + i \,{\rm Ei}\left (-i \, d x\right )\right )} \cos \left (c\right ) + a{\left ({\rm Ei}\left (i \, d x\right ) +{\rm Ei}\left (-i \, d x\right )\right )} \sin \left (c\right )\right )} d^{3} + 4 \, b d x \sin \left (d x + c\right ) - 2 \,{\left (b d^{2} x^{2} - 2 \, b\right )} \cos \left (d x + c\right )}{2 \, d^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^3+a)*sin(d*x+c)/x,x, algorithm="maxima")

[Out]

1/2*((a*(-I*Ei(I*d*x) + I*Ei(-I*d*x))*cos(c) + a*(Ei(I*d*x) + Ei(-I*d*x))*sin(c))*d^3 + 4*b*d*x*sin(d*x + c) -
 2*(b*d^2*x^2 - 2*b)*cos(d*x + c))/d^3

________________________________________________________________________________________

Fricas [A]  time = 1.70361, size = 221, normalized size = 3.88 \begin{align*} \frac{2 \, a d^{3} \cos \left (c\right ) \operatorname{Si}\left (d x\right ) + 4 \, b d x \sin \left (d x + c\right ) - 2 \,{\left (b d^{2} x^{2} - 2 \, b\right )} \cos \left (d x + c\right ) +{\left (a d^{3} \operatorname{Ci}\left (d x\right ) + a d^{3} \operatorname{Ci}\left (-d x\right )\right )} \sin \left (c\right )}{2 \, d^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^3+a)*sin(d*x+c)/x,x, algorithm="fricas")

[Out]

1/2*(2*a*d^3*cos(c)*sin_integral(d*x) + 4*b*d*x*sin(d*x + c) - 2*(b*d^2*x^2 - 2*b)*cos(d*x + c) + (a*d^3*cos_i
ntegral(d*x) + a*d^3*cos_integral(-d*x))*sin(c))/d^3

________________________________________________________________________________________

Sympy [A]  time = 4.84729, size = 85, normalized size = 1.49 \begin{align*} a \sin{\left (c \right )} \operatorname{Ci}{\left (d x \right )} + a \cos{\left (c \right )} \operatorname{Si}{\left (d x \right )} + b x^{2} \left (\begin{cases} - \cos{\left (c \right )} & \text{for}\: d = 0 \\- \frac{\cos{\left (c + d x \right )}}{d} & \text{otherwise} \end{cases}\right ) - 2 b \left (\begin{cases} - \frac{x^{2} \cos{\left (c \right )}}{2} & \text{for}\: d = 0 \\- \frac{\begin{cases} \frac{x \sin{\left (c + d x \right )}}{d} + \frac{\cos{\left (c + d x \right )}}{d^{2}} & \text{for}\: d \neq 0 \\\frac{x^{2} \cos{\left (c \right )}}{2} & \text{otherwise} \end{cases}}{d} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**3+a)*sin(d*x+c)/x,x)

[Out]

a*sin(c)*Ci(d*x) + a*cos(c)*Si(d*x) + b*x**2*Piecewise((-cos(c), Eq(d, 0)), (-cos(c + d*x)/d, True)) - 2*b*Pie
cewise((-x**2*cos(c)/2, Eq(d, 0)), (-Piecewise((x*sin(c + d*x)/d + cos(c + d*x)/d**2, Ne(d, 0)), (x**2*cos(c)/
2, True))/d, True))

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^3+a)*sin(d*x+c)/x,x, algorithm="giac")

[Out]

Exception raised: TypeError